package updater;

import winStrategies.WinLossStrategy;

/**
 * Checks to see if you've won or lost yet.
 * 
 * @author Seon Kang
 * 
 */

public class WinLossStateUpdater implements Updater {
    private WinLossStrategy myWinLossStrategy;

    /**
     * 
     * @param strategy 
     */
    public WinLossStateUpdater(WinLossStrategy strategy) {
        setWinStrategy(strategy);
    }

    @Override
    public void update() {
        myWinLossStrategy.checkWinLoss();
    }

    protected void setWinStrategy(WinLossStrategy strategy) {
        this.myWinLossStrategy = strategy;
    }

    protected WinLossStrategy getWinStrategy() {
        return myWinLossStrategy;
    }
}
